package com.geeaks.learn.snowflake;

import java.util.Set;
import com.google.common.collect.Sets;

public class TestSnow {
	
	static public void main(String[] args) {
		Snowflake snowflake = Snowflake.getInstance(1,1);
		Set<String> set = Sets.newHashSet();
		int i = 0;
		while(true) {
			String id = snowflake.nextId(32);
			System.out.println((++i)+":"+id);
			System.out.println((id+"").length());
			if(set.contains(id)) {
				System.err.println(id);
				break;
			} else {
				set.add(id);
			}
			break;
		}
	}
}
